package day13_net.com.itheima.d2_udp1;

import java.io.IOException;
import java.net.*;

public class Client {
    public static void main(String[] args) throws IOException {
        //目标
        DatagramSocket socket = new DatagramSocket();
        byte[] buffer = "今晚，啤酒，龙虾，小烧烤，约吗？".getBytes();
        DatagramPacket packet = new DatagramPacket(buffer, buffer.length, InetAddress.getLocalHost(), 10086);

        socket.send(packet);
        socket.close();
        System.out.println("发送完毕！");
    }
}
